import { Text, View } from "@tarojs/components";
import ByAvatar from "../ui/ByAvatar";

type UserItemProps = {
  avatar?: string;
  name: string;
  size?: number;
};
export default ({ avatar, name, size = 70 }: UserItemProps) => {
  return (
    <View className="flex-center text-xs">
      <ByAvatar
        size={size}
        className="bg-primary text-[#fff]/80"
        src={avatar}
        alt={name}
      />
      <Text className="ml-2">{name}</Text>
    </View>
  );
};
